import request from '@/utils/request'
import { data } from 'vue-echarts'
export function businessData(params) {
  return request({
    url: '/cybd/api/businessData/queryList',
    params,
    method: 'get'
  })
}
export function getAnnualStatistics(params) {
  return request({
    url: '/cybd/api/annual/taskPost/getAnnualStatistics',
    params,
    method: 'get'
  })
}
// 政府决策七大洲数据
export function continentData(params) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/statistics/queryNewestData',
    params,
    method: 'get'
  })
}
//政府决策 省、县级数据
export function provinceCountyData(params) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/statisticsDetail/copyList',
    params,
    method: 'get'
  })
}

// 单维度多值
export function getTowSideStat(params) {
  return request({
    url: '/cybd/api/annual/taskPost/getTowSideStat',
    params,
    method: 'get'
  })
}
// 有效灌溉面积及除涝治水情况
export function validWaterArea(params) {
  return request({
    url: '/cybd/api/annual/taskPost/validWaterArea',
    params,
    method: 'get'
  })
}
// 单维度多值(按月或日统计)
export function getTowSideStatMonth(params) {
  return request({
    url: '/cybd/api/stat/datestatis/getTowSideStat',
    params,
    method: 'get'
  })
}
// 单维度单值
export function getSingleValue(params) {
  return request({
    url: '/cybd/api/annual/taskPost/getSingleValue',
    params,
    method: 'get'
  })
}
// 双饼图
export function twoPieChartValue(params) {
  return request({
    url: '/cybd/api/annual/taskPost/twoPieChartValue',
    params,
    method: 'get'
  })
}

// 人口区位划分
export function populationDivide(params = { groupCode: 'RKJXZQH' }) {
  return request({
    url: '/cybd/api/annual/taskPost/populationDivide',
    params,
    method: 'get'
  })
}

// 土地地图
export function landInfo(params) {
  return request({
    url: '/cybd/api/stat/landInfo/queryList',
    params,
    method: 'get'
  })
}

// 农业科技
export function agricultural(params) {
  return request({
    url: '/cybd/api/stat/agricultural/queryList',
    params,
    method: 'get'
  })
}

// 概述地图
export function districts(params) {
  return request({
    url: '/cybd/api/stat/districts/queryList',
    params,
    method: 'get'
  })
}

// 产业基础人口地图
export function populationMap(params) {
  return request({
    url: '/cybd/api/stat/populationMap/queryList',
    params,
    method: 'get'
  })
}

// 产业基础地图
export function landUse(params) {
  return request({
    url: '/cybd/api/stat/landUse/queryList',
    params,
    method: 'get'
  })
}

// 组织
export function queryOrganizationList(params) {
  return request({
    url: '/cybd/api/stat/agricultural/queryOrganizationList',
    params,
    method: 'get'
  })
}

// 大气环境
export function atmospheric(params) {
  return request({
    url: '/cybd/api/stat/atmospheric/queryList',
    params,
    method: 'get'
  })
}

// 图表单维度多值正负差额统计(按年统计)
export function getTowSideBalanceStat(params) {
  return request({
    url: '/cybd/api/annual/taskPost/getTowSideBalanceStat',
    params,
    method: 'get'
  })
}

// 图表单维度多值正负差额统计(按月或日统计)
export function getTowSideBalanceStatMonth(params) {
  return request({
    url: '/cybd/api/stat/datestatis/getTowSideBalanceStat',
    params,
    method: 'get'
  })
}

// 农产品价格趋势
export function queryMainProductPriceTrend(params) {
  return request({
    url: '/cybd/api/agri/agriProductPrice/queryMainProductPriceTrend',
    params,
    method: 'get'
  })
}

// 农业市场
export function agriculturalMarket(params) {
  return request({
    url: '/cybd/api/stat/agriculturalMarket/queryList',
    params,
    method: 'get'
  })
}

// 农资使用量信息查询-单个
export function agriculturalUse(params) {
  return request({
    url: '/cybd/api/agri/agriculturalUse/queryList',
    params,
    method: 'get'
  })
}
// 在研项目列表
export function inlandAgrictproject(params) {
  return request({
    url: '/cybd/api/agri/inlandAgrictproject/queryList',
    params,
    method: 'get'
  })
}
// 农业标准规范
export function agriOperNorm(params) {
  return request({
    url: '/cybd/api/agri/agriOperNorm/queryList',
    params,
    method: 'get'
  })
}
// 农技成果
export function agriTechPrize(params) {
  return request({
    url: '/cybd/api/agri/agriTechPrize/queryList',
    params,
    method: 'get'
  })
}
// 农业科技人才
export function agriTechTalent(params) {
  return request({
    url: '/cybd/api/agri/agriTechTalent/queryList',
    params,
    method: 'get'
  })
}
// 热词相关
export function hotWords(params) {
  return request({
    url: '/cybd/api/stat/hotWords/queryList',
    params,
    method: 'get'
  })
}
// 雷达图-图表单维度多值显示统计
export function getTowSideStatAndRadar(params) {
  return request({
    url: '/cybd/api/annual/taskPost/getTowSideStatAndRadar',
    params,
    method: 'get'
  })
}

// 主要生产经营主体
export function produceBusiness(params) {
  return request({
    url: '/cybd/api/stat/produceBusiness/queryList',
    params,
    method: 'get'
  })
}

// 受灾面积
export function disasterArea(params) {
  return request({
    url: '/cybd/api/stat/disasterArea/queryList',
    params,
    method: 'get'
  })
}

// 主要农作物种植面积
export function plantAreaCrops(params) {
  return request({
    url: '/cybd/api/stat/plantAreaCrops/queryList',
    params,
    method: 'get'
  })
}
// 单维度多值正负统计
export function getTowSideStatUpDown(params) {
  return request({
    url: '/cybd/api/annual/taskPost/getTowSideStatUpDown',
    params,
    method: 'get'
  })
}

//
export function queryVariety(params) {
  return request({
    url: '/cybd/api/agri/agriProductPrice/queryVarietyLatestPriceList',
    params,
    method: 'get'
  })
}

// 农资价格信息查询
export function agriculturalPrice(params) {
  return request({
    url: '/cybd/api/agri/agriculturalPrice/queryList',
    params,
    method: 'get'
  })
}

// 农资概况
export function queryMergeList(params) {
  return request({
    url: '/cybd/api/agri/agriculturalUse/queryMergeList',
    params,
    method: 'get'
  })
}

// 生产总值
export function districtsGDP(params) {
  return request({
    url: '/cybd/api/stat/districts/queryGDPList',
    params,
    method: 'get'
  })
}

// tenantCode  暂时写死
const tenantCode = 'T000010'
// const tenantCode = '1'
// 统计公共数据(单条)
export function getEchartsData(dataType, page = 1, perPage = 5, orderBy = 'dataDate', orderDir = 'desc') {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/statistics/queryListPage',
    params: {
      page,
      perPage,
      orderBy,
      orderDir,
      dataType,
      tenantCode
    },
    method: 'get'
  })
}
// 统计公共接口(多条)
export function getEchartsDataS(dataType) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/statisticsDetail/copyList',
    params: {
      dataType,
      tenantCode
    },
    method: 'get'
  })
}
// 统计公共接口(多条)
export function getEchartsDataS2(dataType) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/statisticsDetail/queryNewList',
    params: {
      dataType,
      tenantCode
    },
    method: 'get'
  })
}
// 养殖企业养殖户
export function cultivationEnterprise() {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/enterpriseInfo/queryList',
    params: {
      tenantCode
    },
    method: 'get'
  })
}

// 首页地图上方汇总数据
export function homePagemap() {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/statistics/queryIndexStats',
    params: {
      tenantCode
    },
    method: 'get'
  })
}
// 专家信息数据
export function getInformation(typeCode) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/expertInformation/queryList',
    params: {
      typeCode,
      tenantCode
    },
    method: 'get'
  })
}
// 技术资料
export function technicalData(data) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/technologyInfo/queryNumByTypeAndYear',
    params: {
      ...data,
      tenantCode
    },
    method: 'get'
  })
}
// 技术培训通知公告
export function trainingAnnouncement(data) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/trainingNotice/queryListPage',
    params: {
      ...data,
      tenantCode
    },
    method: 'get'
  })
}
// 产业标准
export function productStandard(data) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/technologyInfo/queryNumByType',
    params: {
      ...data,
      tenantCode
    },
    method: 'get'
  })
}
// 专家信息分类
export function classificationExpert() {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/expertInformation/queryNumByType',
    params: {
      tenantCode
    },
    method: 'get'
  })
}
// 专家信息分类
export function informationExpert() {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/expertInformation/queryListPage',
    params: {
      page: 1,
      perPage: 1,
      tenantCode
    },
    method: 'get'
  })
}
/**
 * 技术资料列表分页
 */
export function getTechnologyData(params) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/technologyInfo/queryListPage',
    params: {
      tenantCode,
      ...params
    },
    method: 'get'
  })
}
/**
 * 查询按类型统计数据
 */
export function checkTypeStatistical(params) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/technologyInfo/queryNumByType',
    params: {
      tenantCode,
      ...params
    },
    method: 'get'
  })
}
/**
 * 查询最新数据
 */
export function checkNewData(params) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/statistics/queryNewestData',
    params: {
      tenantCode,
      ...params
    },
    method: 'get'
  })
}
/**
 * 养殖企业
 */
export function firmAll() {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/enterpriseInfo/queryList',
    params: {
      tenantCode
    },
    method: 'get'
  })
}
/**
 * 企业羊信息
 */
export function sheepInfo(params) {
  return request({
    url: '/lxnsy/api/customized/lxnsy/screen/statistics/queryListPage',
    params: {
      tenantCode,
      ...params
    },
    method: 'get'
  })
}

